package properties;

import util.io.ResourceUtil;

import java.io.InputStream;
import java.util.Properties;

/**
 * Created by Administrator on 2017/5/21.
 */
public class SystemProperty {
    //本地文件存储路径
    private static String localFilePath;
    //头像文件夹名称
    private static String expertHeadImgFolder;
    private static String certificateImgFolder;
    private static String assessFileFolder;
    private static String excelTemplateFolder;
    private static String noticeFileFolder;
    //专家默认分配角色的Id
    private static String  expertRoleId;
    //企业默认分配的角色Id
    private static String companyRoleId;
    //检验检测上报材料超期
    private static String examineOverdueId;
    //工许上报材料超期
    private static String industryOverdueId;

    private  static String  createExpertAccountUrl;
    private static  String  selectExpertAccountUrl;


    static {
        try {
            Properties  properties = new Properties();
            InputStream is = ResourceUtil.getInputStreamForPath("classpath:config/properties/system.properties");
            properties.load(is);
            localFilePath = properties.getProperty("localFilePath");
            expertHeadImgFolder = properties.getProperty("expertHeadImgFolder");
            certificateImgFolder = properties.getProperty("certificateImgFolder");
            assessFileFolder = properties.getProperty("assessFileFolder");
            excelTemplateFolder = properties.getProperty("excelTemplateFolder");
            noticeFileFolder = properties.getProperty("noticeFileFolder");
            expertRoleId = properties.getProperty("expertRoleId");
            companyRoleId =properties.getProperty("companyRoleId");
            examineOverdueId = properties.getProperty("examineOverdueId");
            industryOverdueId = properties.getProperty("industryOverdueId");
            createExpertAccountUrl = properties.getProperty("createExpertAccountUrl");
            selectExpertAccountUrl = properties.getProperty("selectExpertAccountUrl");


        } catch (Exception e) {
            throw new RuntimeException("读取配置文件出现异常 classpath:config/properties/system.properties");
        }
    }

    public static String getLocalFilePath() {
        return localFilePath;
    }

    public static String getExpertHeadImgFolder() {
        return expertHeadImgFolder;
    }

    public static String getCertificateImgFolder() {
        return certificateImgFolder;
    }

    public static String getAssessFileFolder() {
        return assessFileFolder;
    }

    public static String getExcelTemplateFolder() {
        return excelTemplateFolder;
    }

    public static String getNoticeFileFolder() {
        return noticeFileFolder;
    }

    public static String getExpertRoleId() {
        return expertRoleId;
    }

    public static String getCompanyRoleId() {
        return companyRoleId;
    }

    public static String getExamineOverdueId() {
        return examineOverdueId;
    }

    public static String getIndustryOverdueId() {
        return industryOverdueId;
    }


    public static String getCreateExpertAccountUrl() {
        return createExpertAccountUrl;
    }

    public static String getSelectExpertAccountUrl() {
        return selectExpertAccountUrl;
    }
}
